{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block body %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"行业管理",back:1} %}
    <div class="bcf bdbso bdc13">
        <mu-tabs :value.sync="curTab" change="tab" full-width indicator-color="yellowA200"  center :color="c1" >
            <mu-tab>
                <div>已设置</div>
            </mu-tab>
            <mu-tab>
                <div>去申请</div>
            </mu-tab>
            <mu-tab>
                <div>申请记录</div>
            </mu-tab>
        </mu-tabs>
    </div>

    <div class="pad10 bcf" v-if="curTab == 0">
        <div class="c1 tac pad5"><span class="fa fa-gg"></span> 可选主营行业 <span>[[limit.cat1Max]]</span> / 已选 <span>[[limit.cat1Cur]]</span> <span class="fa fa-gg"></span></div>
        <div>
            <div v-if="limit.cat1Cur == 0" class="mar10 pad10 tac c12 bdda round3">暂未选择</div>
            <div class="scrollX-Box">
                <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in cat1list">
                    <div>
                        <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                    </div>
                    <div class="tac"> [[item.name]]</div>
                </div>

            </div>
        </div>
        <div class="c1 tac pad5"><span class="fa fa-gg"></span> 可选主营分类 <span>[[limit.cat2Max]]</span> / 已选 <span>[[limit.cat2Cur]]</span> <span class="fa fa-gg"></span></div>
        <div>
            <div v-if="limit.cat1Cur == 0" class="mar10 pad10 tac c12 bdda round3">暂未选择</div>
            <div class="scrollX-Box">
                <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in cat2list">
                    <div>
                        <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                    </div>
                    <div class="tac"> [[item.name]]</div>
                </div>

            </div>
        </div>

        <div class="bc2 c13 pad5 round3 op7 fs8 lh1 mart30">
            <p>提示：</p>
            <p>1.更换行业需要平台审核</p>
            <p>2.每次修改会删除原有行业</p>
            <p>3.缴纳保证金可以获得更多可选额度</p>
        </div>
{#        <div>可选主营行业 <span>[[limit.cat1Max]]</span> / 已选 <span>[[limit.cat1Cur]]</span></div>#}
{#        <div>可选主营分类 <span>[[limit.cat2Max]]</span> / 已选 <span>[[limit.cat2Cur]]</span></div>#}
    </div>

    <div class="c12 fs8" v-if="curTab == 1">
{#        <div class="c1 tac pad5 bcf bdtso bdc13 bdw5"><span class="fa fa-gg"></span> 保证金特权 <span class="fa fa-gg"></span></div>#}
        <div class="bcf">
            <div class="padl2 bc13 padtb9">主营行业(可选[[limit.cat1Max]]/已选[[limit.cat1Cur]])</div>
            <div class="pad5">
                <div class="list-style-2">待选项</div>
                <div class="bcf pad6 round3 fs8  c11" v-if="showCat1">
                    <div class="flex2 tac scrollX-Box">
                        <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in cats" v-if="!inArray(item.id,choose1)">
                            <div>
                                <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                            </div>
                            <div class="tac"> [[item.name]]</div>
                            <mu-ripple @click="setCat1(index)"></mu-ripple>
                        </div>
                    </div>
                </div>
                <div class="list-style-1 c1">已选择</div>
                <div class="bcf pad6 round3 fs8  c11" v-if="showCat1">
                    <div class="flex2 tac scrollX-Box">
                        <div v-if="0 == choose1.length" class="mar5 pad20 tac c12 bdda ">尚未选择任何内容</div>
                        <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in cats" v-if="inArray(item.id,choose1)">
                            <div>
                                <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                            </div>
                            <div class="tac"> [[item.name]]</div>
                            <mu-ripple @click="removeCat1(index)"></mu-ripple>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="bcf">
            <div class="padl2 bc13 padtb9">主营分类(可选[[limit.cat2Max]]/已选[[limit.cat2Cur]])</div>
            <div class="bcf pad6 round3 bdbda fs8  c11" v-if="showCat2">
                <div class="pad5">
                    <div class="list-style-2">待选项</div>
                    <div class="bcf pad6 round3 fs8  c11" v-if="showCat2">
                        <div v-if="choice2.length == choose2.length" class="mar5 pad20 tac c12 bdda ">没有可选项</div>
                        <div class="flex2 tac scrollX-Box">
                            <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in choice2" v-if="!inArray(item.id,choose2)">
                                <div>
                                    <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                                </div>
                                <div class="tac"> [[item.name]]</div>
                                <mu-ripple @click="setCat2(index)"></mu-ripple>
                            </div>
                        </div>
                    </div>
                    <div class="list-style-1 c1">已选择</div>
                    <div class="bcf pad6 round3 fs8  c11" v-if="showCat2">
                        <div v-if="0 == choose2.length" class="mar5 pad20 tac c12 bdda ">尚未选择任何内容</div>
                        <div class="flex2 tac scrollX-Box">
                            <div class="scrollX-Item pad5 mar2 bdso pos-r" v-for="item,index in choice2" v-if="inArray(item.id,choose2)">
                                <div>
                                    <img :src="picUrl(item.pic)" class="wh15-15" alt="" onerror="this.src=pic404">
                                </div>
                                <div class="tac"> [[item.name]]</div>
                                <mu-ripple @click="removeCat2(index)"></mu-ripple>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="bc13 c13 pad10 fs24">&nbsp;</div>
        <div class="pad10 pos-f b0 l0 r0 bcf">
            <mu-button @click="submit()" large :color="c1" full-width round>提交审核</mu-button>
        </div>
    </div>

    <div v-if="curTab == 2" class="">
        <div v-for="item in list" class="bcf shadow1 c12 mar10 pad5 fs8 lh2 round3">
            <div>申请行业：[[item.category.name]]</div>
            <div>申请时间：[[str2time(item.createAt)]]</div>
            <div>申请状态：
                <span class="c12" v-if="item.status == 0">等待处理</span>
                <span class="c01" v-if="item.status == 1">通过</span>
                <span class="c02" v-if="item.status == 2">驳回 <span>（原因：[[item.message]]）</span></span>
            </div>

        </div>
    </div>
{% endblock %}